<?php defined('SYSPATH') OR die('No direct access allowed.');
	$responsavel = ( isset($responsavel) )? $responsavel : '';
        
        LibAux::debug($responsavel);
        exit;
        
?>

<table id="gridPesquisa">
    <thead>
        <tr>
            <th width="100px">Nome Responsavel:</th>
            <th width="30px">Telefones:</th>
            <th width="30px">Endereço:</th>
            <th width="30px">Referência:</th>
            
        </tr>
    </thead>
    
    <?php

    echo '<tbody>';
    
    foreach ($responsavel as $arrLinha) {
           $nome_responsavel = $arrLinha['nome_responsavel'];
           $arrTelefone = explode(';', $arrLinha['telefone']);
           $endereço = $arrLinha['rua'] . ' ' . $arrLinha['numero'] . ' ' . $arrLinha['complemento'] . ' - ' . $arrLinha['bairro'];
           $referencia = $arrLinha['referencia'];
           
           $telefone = '';
           foreach ($arrTelefone as $key => $value){
               $telefone .= $arrTelefone[$key] . '<br />';
           }

            echo '<tr>';
            echo '<td width="100px">';
            echo $nome_responsavel ;
            echo '</td>';
            echo '<td>';
            echo $telefone;
            echo '</td>';
            echo '<td>';
            echo $endereço;
            echo '</td>';
            echo '<td>';
            echo $referencia;
            echo '</td>';
            
    }
    
    echo '</tbody>';
    
    ?>
</table>
